/*
 * Wazuh databaseFeedManager
 * Copyright (C) 2015, Wazuh Inc.
 * September 25, 2023.
 *
 * This program is free software; you can redistribute it
 * and/or modify it under the terms of the GNU General Public
 * License (version 2) as published by the FSF - Free Software
 * Foundation.
 */
#ifndef _MOCK_ROUTERSUSCRIBER_HPP
#define _MOCK_ROUTERSUSCRIBER_HPP

#include "gmock/gmock.h"
#include "gtest/gtest.h"

#include <functional>
#include <string>
#include <vector>

/**
 * @class MockRouterSubscriber
 *
 * @brief Mock class for simulating a router subscriber object.
 *
 * The `MockRouterSubscriber` class is designed to simulate the behavior of a content
 * register for testing purposes. It provides mock implementations of methods and
 * allows you to set expectations on method calls and their return values for testing.
 *
 * This class is used in unit tests only to verify interactions with a content
 * register without actually performing real operations on it.
 */
class MockRouterSubscriber
{
public:
    /**
     * @brief Constructor for creating a mock MockRouterSubscriber object.
     *
     * The `MockRouterSubscriber` constructor initializes a new instance of the mock MockRouterSubscriber
     * class, which is used for simulating the behavior of a content register for testing purposes.
     * You can specify the `topicName` and additional `subscriberId` as input when creating a mock instance.
     *
     * @param topicName The name of the topic associated with the mock ContentRegister.
     * @param subscriberId Additional parameters provided as a string.
     * @param isLocal Enable if local or not, default true.
     */
    MockRouterSubscriber(std::string topicName, std::string subscriberId, const bool isLocal = true) {};
    virtual ~MockRouterSubscriber() = default;

    /**
     * @brief Mock method for subscribe.
     *
     * @note This method is intended for testing purposes and does not perform any real action.
     */
    MOCK_METHOD(void, subscribe, (const std::function<void(const std::vector<char>&)>& callback), ());
};

#endif // _MOCK_ROUTERSUSCRIBER_HPP
